package com.demo.javaee.project.json.model;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.json.bind.annotation.JsonbDateFormat;
import javax.json.bind.annotation.JsonbNumberFormat;
import javax.json.bind.annotation.JsonbProperty;
import javax.json.bind.annotation.JsonbTransient;
import java.math.BigDecimal;
import java.time.LocalDate;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class Student {

    private Long id;

    private String no;

    private String name;

    private String sex;

    private LocalDate birthday;

    private BigDecimal tuition;

    @JsonbNumberFormat(value = "#0.00", locale = "en_US")
    public void setTuition(BigDecimal tuition) {
        this.tuition = tuition;
    }
}
